<template>
  <div class="mains">
    <div class="div1">
     <form id="registerForm" action="#" >
        <div>
          指标结果id:<input type="text"  required v-model="medical.quotaresultid"/>
        </div>
        <br />
        <div>
         指标id:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text"  required v-model="medical.quotaid"/>
        </div>
        <br />
        <div>
          计划执行id:<input type="text" required v-model="medical.planexecuteid"/>
        </div>
         <br />
        <div>
          儿童id:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" required v-model="medical.childid"/>
        </div>
         <br />
        <div>
          检查结果:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <textarea class="jc" required v-model="medical.checkesult"></textarea>
          <!-- <input type="text" class="jc" required v-model="medical.checkesult"/> -->
        </div>
         <br />
        <div>
          检查时间:&nbsp;&nbsp;&nbsp;<input type="date" required v-model="medical.checkdate" />

        </div>
         <br />
        <div>
          描述:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<textarea type="text" class="jc" required v-model="medical.describe"/>
        </div>
        <br />
        <div> <input type="button" value="确定"  class="button1" @click="handleAdd()"/>
        <input type="button" value="返回" onclick="history.back(-1)" class="button1"/>
        </div>

      </form>
    </div>
  </div>
</template>

<script>
import QS from 'qs'
export default{
  name: 'updateMedicalskill',
  data () {
    return {
      medical: {}
    }
  },
  methods: {
    handleAdd () {
      var that = this
      console.log(that.medical)
      this.$http.post('/addQutoa',QS.stringify(that.medical) ).then(resp => {
        if (resp.data) {
          console.log(this.medical)
          this.$router.push('/medicalskill')
        } else {
          alert('添加失败')
        }
      })
    }

  }
}
</script>

<style>

  .mains{
  width: 700px;
  height: 720px;
 background-color: #D9FFFF;
  margin-left: 400px;
}
  .div1{
text-align: center;
padding-top: 30px;
}
.button1{
  background-color:#AFEEEE;
  color: white;
  width: 100px;
  height: 40px;
  border-radius: 20px;
  font-size:medium;
  margin-left: 30px;
}
.jc{
  height: 100px;
}
</style>
